package com.example.mapboot.dto.covid;

import com.fasterxml.jackson.annotation.JsonProperty;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serializable;
import java.util.List;

@NoArgsConstructor
@Data
public class CovidDTO implements Serializable{

    @JsonProperty("reqId")
    private Long reqId;
    @JsonProperty("code")
    private Integer code;
    @JsonProperty("msg")
    private String msg;
    @JsonProperty("data")
    private DataDTO data;
    @JsonProperty("timestamp")
    private Long timestamp;

    @NoArgsConstructor
    @Data
    public static class DataDTO  implements Serializable {
        @JsonProperty("chinaTotal")
        private ChinaTotalDTO chinaTotal;
        @JsonProperty("chinaDayList")
        private List<ChinaDayListDTO> chinaDayList;
        @JsonProperty("lastUpdateTime")
        private String lastUpdateTime;
        @JsonProperty("overseaLastUpdateTime")
        private String overseaLastUpdateTime;
        @JsonProperty("areaTree")
        private List<AreaTreeDTO> areaTree;

        @NoArgsConstructor
        @Data
        public static class ChinaTotalDTO  implements Serializable{
            @JsonProperty("today")
            private TodayDTO today;
            @JsonProperty("total")
            private TotalDTO total;
            @JsonProperty("extData")
            private ExtDataDTO extData;

            @NoArgsConstructor
            @Data
            public static class TodayDTO implements Serializable {
                @JsonProperty("confirm")
                private Integer confirm;
                @JsonProperty("suspect")
                private Object suspect;
                @JsonProperty("heal")
                private Integer heal;
                @JsonProperty("dead")
                private Integer dead;
                @JsonProperty("severe")
                private Object severe;
                @JsonProperty("storeConfirm")
                private Integer storeConfirm;
                @JsonProperty("input")
                private Integer input;
            }

            @NoArgsConstructor
            @Data
            public static class TotalDTO  implements Serializable{
                @JsonProperty("confirm")
                private Integer confirm;
                @JsonProperty("suspect")
                private Integer suspect;
                @JsonProperty("heal")
                private Integer heal;
                @JsonProperty("dead")
                private Integer dead;
                @JsonProperty("severe")
                private Integer severe;
                @JsonProperty("input")
                private Integer input;
            }

            @NoArgsConstructor
            @Data
            public static class ExtDataDTO  implements Serializable{
                @JsonProperty("noSymptom")
                private Integer noSymptom;
                @JsonProperty("incrNoSymptom")
                private Integer incrNoSymptom;
            }
        }

        @NoArgsConstructor
        @Data
        public static class ChinaDayListDTO  implements Serializable{
            @JsonProperty("date")
            private String date;
            @JsonProperty("today")
            private TodayDTO today;
            @JsonProperty("total")
            private TotalDTO total;
            @JsonProperty("extData")
            private Object extData;
            @JsonProperty("lastUpdateTime")
            private Object lastUpdateTime;

            @NoArgsConstructor
            @Data
            public static class TodayDTO  implements Serializable{
                @JsonProperty("confirm")
                private Integer confirm;
                @JsonProperty("suspect")
                private Integer suspect;
                @JsonProperty("heal")
                private Integer heal;
                @JsonProperty("dead")
                private Integer dead;
                @JsonProperty("severe")
                private Object severe;
                @JsonProperty("storeConfirm")
                private Integer storeConfirm;
                @JsonProperty("input")
                private Integer input;
            }

            @NoArgsConstructor
            @Data
            public static class TotalDTO  implements Serializable{
                @JsonProperty("confirm")
                private Integer confirm;
                @JsonProperty("suspect")
                private Integer suspect;
                @JsonProperty("heal")
                private Integer heal;
                @JsonProperty("dead")
                private Integer dead;
                @JsonProperty("severe")
                private Object severe;
                @JsonProperty("input")
                private Integer input;
                @JsonProperty("storeConfirm")
                private Integer storeConfirm;
            }
        }

        @NoArgsConstructor
        @Data
        public static class AreaTreeDTO  implements Serializable{
            @JsonProperty("today")
            private TodayDTO today;
            @JsonProperty("total")
            private TotalDTO total;
            @JsonProperty("name")
            private String name;
            @JsonProperty("id")
            private String id;
            @JsonProperty("lastUpdateTime")
            private String lastUpdateTime;
            @JsonProperty("children")
            private List<?> children;

            @NoArgsConstructor
            @Data
            public static class TodayDTO  implements Serializable{
                @JsonProperty("confirm")
                private Integer confirm;
                @JsonProperty("suspect")
                private Object suspect;
                @JsonProperty("heal")
                private Integer heal;
                @JsonProperty("dead")
                private Integer dead;
                @JsonProperty("severe")
                private Object severe;
                @JsonProperty("storeConfirm")
                private Object storeConfirm;
            }

            @NoArgsConstructor
            @Data
            public static class TotalDTO implements Serializable {
                @JsonProperty("confirm")
                private Integer confirm;
                @JsonProperty("suspect")
                private Integer suspect;
                @JsonProperty("heal")
                private Integer heal;
                @JsonProperty("dead")
                private Integer dead;
                @JsonProperty("severe")
                private Integer severe;
                @JsonProperty("input")
                private Integer input;
            }
        }
    }
}
